#ifndef __PROGRAMPARAMETERNAME_H__
#define __PROGRAMPARAMETERNAME_H__

#include <export.h>
#include <iobject.h>
#include <map>
#include <string>

/**
 * \addtogroup graphics
 * @{
 */
/**
 * @brief Manager for getting creating parameters used within the shading system
 */
class CE_API ceProgramParameterNameManager
{
private:
  std::map<std::string, int>	_ids;
  std::map<int, std::string> _names;

  unsigned								_count;

  static ceProgramParameterNameManager*	static_instances;

private:
  ceProgramParameterNameManager ();

public:
  static ceProgramParameterNameManager* Get ();

	unsigned GetNumberOfNames () const;

  int AddName (const char* name);
  std::string GetName (int id) const;
  int GetId (const char* name);
};

/**
 * @brief Representation of the name of a variable within the shading system.
 */
class CE_API ceProgramParameterName
{
private:
  std::string  _name;
  int         _id;
  bool        _valid;
	
public:
  ceProgramParameterName();

  ceProgramParameterName(const ceProgramParameterName& other);
  ceProgramParameterName(const char* name);
  ceProgramParameterName(int id);

  bool operator== (const ceProgramParameterName& other) const
	{
		return _id == other._id;
	}

  inline bool IsValid () const { return _valid; }

  const char* GetName ();
  inline const char* GetName () const { return _name.c_str(); }
  inline int GetId () const { return _id; }

};

/** @} */

#endif // PROGRAMPARAMETERNAME_H
